package edu.zut.cs.software.cms.module.score.domain;

import java.util.List;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import edu.zut.cs.software.cms.base.domain.BaseTreeEntity;



/***
 * it is an class that keeps usual performance...
 * 
 * @author admix
 *
 */
@Entity
@Table(name = "T_PERFORMANCE")
@NamedQueries({
		@NamedQuery(name = "Performance.getRoot", query = "select m from Performance m where m.parent is null") })
public class Performance extends BaseTreeEntity<Performance, Long> {

	/**
	 * The department to which the score belong
	 */
	private static final long serialVersionUID = 2609343373200636898L;
	
	@Column
	String homework;
	/**
	 * this is to recored score of work
	 * 
	 * 
	 */
	@Column
	String attendance;
	/**
	 * this is recored score of attendance in daily life.
	 */
	@Column
	String test;
	
	/**
	 * this is recored score of  daily test.
	 */
	@OneToMany(mappedBy = "performance", cascade = CascadeType.REMOVE, fetch = FetchType.EAGER)
	List<Score> score;

	public String getHomework() {
		return homework;
	}

	public void setHomework(String homework) {
		this.homework = homework;
	}

	public String getAttendance() {
		return attendance;
	}

	public void setAttendance(String attendance) {
		this.attendance = attendance;
	}

	public String getTest() {
		return test;
	}

	public void setTest(String test) {
		this.test = test;
	}
	public List<Score> getScore() {
		return score;
	}

	public void setScore(List<Score> score) {
		this.score = score;
	}

	public static long getSerialversionuid() {
		return serialVersionUID;
	}
	

}
